include mixin

ul.breadcrumb
	li
		a(href='/portal/index') 首页
	li.sep >
	li
		a(href='#/fund') 基金产品
	li.sep >
	li.cd 基金对比

.fundSelecterContainer.mtop10
	.title.font16
		.pull-right.font14(style='font-weight:normal')
			span.mright30.number1 选择条件筛选基金
			span.mright20.number2 筛选结果加入对比
		span.b 基金对比
	.pad30
		.tips.font14.mbottom10(style='text-indent:14px') 最多可同时对比
			span(style='color:#ff6000') 4只
			| 基金，所对比的基金建议为同一类型。
		.fundList
			.fund(ng-repeat='item in compareList')
				.content.fundDetail(ng-show='item.code')
					.triangle
					a.name.font18.b(gf-href='#/fund/detail?pid={{item.id}}', ng-bind='item.title')
					.code.font12(ng-bind='item.code')
					.fundType.font12 基金类型：
						span(ng-bind='item.extra2.jjlx')
					.earnings 月收益率：
						span(ng-bind='(item.extra.yieldratetm | number : 2) + "%"', ng-class='{up : item.extra.yieldratetm > 0, down : item.extra.yieldratetm < 0}')
					.earnings 年收益率：
						span(ng-bind='(item.extra.yieldratety | number : 2) + "%"', ng-class='{up : item.extra.yieldratety > 0, down : item.extra.yieldratety < 0}')
					.remove.tac.mtop30(ng-click='remove(item)') x
						span(style='padding-left:3px;color:#0174a9') 清除
				.content(ng-show='!item.code')
					.tac.font14.padbottom10 添加基金
					.filters.padtop20
						form.searchForm.nomp(ng-controller='App.SearchFormCtrl')
							.search
								div(style='position:relative;width:156px')
									input.border(placeholder='输入名称或代码', style='width:121px', type='search', ng-model='q', name='q',  gf-textsearch='#compareFundSearchList', focus-cls='lbc b blurborder', autocomplete='off', line-height=22)
								dl.resultPanel.border(ng-show='products.fund && products.fund.length', style='width:150px')
									dd(ng-repeat='pro in products.fund')
										a(href='javascript:;', ng-click='$parent.q = pro[0];$parent.selectedItem = pro;add(pro)')
											span(ng-bind-html-unsafe='pro[0] | highlight : q : "highlight b"')
											| ({{pro[2]}})
						p 筛选
						.mbottom10
							.selectContainer.selectParContainer
								select
						.selectContainer.fundSelector
							select
				.btns.tac(ng-show='item.code', style='margin-top:17px')
					a.buy.mright10(href='#/fund/detail?pid={{item.id}}') 购买
					a.addToMine(ng-show='hasLogin', href='javascript:;', ng-click='addToMine(item)')
						span(ng-show='!item.hasAddToMime') 加入自选
						span(ng-show='item.hasAddToMime') 已加入自选
		.tac.mtop20.beginCompareBut.hidden: a.goToCompare(href='javascript:;', ng-click='goToCompare()', ng-class='{goToCompareDisabled : goToCompareDisabled}') 开始对比
		.tac.mtop20(ng-show='comparing') 正在对比基金中，请稍候...

.fundCompareResult.mtop20(ng-show='showCompareResult')
	.tabs.b
		.tab(ng-repeat='tag in tags', ng-bind='tag', ng-class='{active : activeIndex == $index}', ng-click='active($index)')

	.pad20(ng-show='activeIndex == 0')
		table.fundDetailTable
			thead
				tr
					th 简称
					th 代码
					th.company 公司
					th 类型
					th 投资类型
					th 投资风格
					th 风险评价
			tbody
				tr(ng-repeat='item in compareList', ng-class-even="'even'", ng-show='item.code')
					td(ng-bind='item.title')
					td(ng-bind='item.code')
					td(ng-bind='item.vendor')
					td(ng-bind='item.extra2.jjlx')
					td(ng-bind='item.extra2.jjfg')
					td(ng-bind='item.extra2.jjxz')
					td(ng-bind='riskLevelLabels[item.risk_level]')
		h3.mtop30.performanceCompare 业绩比较
		table.fundPerformanceTable
			thead
				tr
					th(style='width:120px')
					th(ng-repeat='item in compareList', ng-bind='item.title || "-"')
			tbody
				tr
					td 最近一月
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldrate1m | number : 2', ng-class='{up : item.extra.yieldrate1m > 0, down : item.extra.yieldrate1m < 0}')
				tr
					td 最近一季
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldrate3m | number : 2', ng-class='{up : item.extra.yieldrate3m > 0, down : item.extra.yieldrate3m < 0}')
				tr
					td 最近半年
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldrate6m| number : 2', ng-class='{up : item.extra.yieldrate6m > 0, down : item.extra.yieldrate6m < 0}')
				tr
					td 最近一年
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldrate1y| number : 2', ng-class='{up : item.extra.yieldrate1y > 0, down : item.extra.yieldrate1y < 0}')
				tr
					td 今年以来
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldratety| number : 2', ng-class='{up : item.extra.yieldratety > 0, down : item.extra.yieldratety < 0}')
				tr
					td 三年以来
					td(ng-repeat='item in compareList', ng-bind='item.extra.yieldrate3y| number : 2', ng-class='{up : item.extra.yieldrate3y > 0, down : item.extra.yieldrate3y < 0}')
		h3.mtop30.growthMovement 增长趋势曲线
		div(gf-chart='chartData', id='fundchart', style='height: 284px;*height: 309px;')

	.pad20(ng-show='activeIndex == 1')
		table.assetAllocationTable
			thead
				tr
					th .
					th(ng-repeat='name in assetAllocationInfos.names', ng-bind='name || "--"')
			tbody
				tr(ng-repeat='infos in assetAllocationInfos.detail')
					td(ng-bind='infos.name')
					td(ng-repeat='info in infos.values', ng-bind='info')
				tr
					td .
					td.chartView(ng-repeat='name in assetAllocationInfos.names', ng-class='{active : assetAllocationChartIndex == $index}')
						.arrow1
						.arrow2
						a.link(ng-show='name', ng-click='showChart($index)', href='javascript:;') 查看图示
		#assetAllocationChart(style='height:300px', ng-show='assetAllocationChartIndex != -1')

	.pad20(ng-show='activeIndex == 2')
		table.positionStockTable
			thead
				tr
					th(ng-repeat='name in positionStockInfos.names', ng-bind='name || "--"')
			tbody
				tr
					td(ng-repeat='name in positionStockInfos.names', style='background-color:#f0f0f0')
						span.secuabbr(ng-show='name') 股票名称
						span.pctoftotalasset(ng-show='name') 占比
				tr(ng-repeat='stockInfos in positionStockInfos.stockInfosList', ng-class-even="'even'")
					td(ng-repeat='stockInfo in stockInfos')
						span.secuabbr(ng-bind='stockInfo.secuabbr', ng-show='stockInfo.secuabbr')
						span.pctoftotalasset(ng-bind='(stockInfo.pctoftotalasset | number : 2) + "%"', ng-show='stockInfo.secuabbr')


.fundRecommendList.mtop20(ng-show='showRecommendList')
	.recentlyViews.fundRecommendItems(ng-show='recentlyViews && recentlyViews.length')
		.content(style='margin-right:15px')
			.title.b.fundCompareIcon1 最近浏览过的基金对比
			ul
				li(ng-repeat='item in recentlyViews', ng-last-class='lastItem')
					.addToCompare(ng-click='add(item)')
						.selectBox
						| 加入对比
					p.name.b(ng-bind='item.title')
					p.category 类型：
						span(ng-bind='item.extra2.jjlx')


	.hot5Fund.fundRecommendItems(ng-show='hot5FundList && hot5FundList.length')
		.content(style='margin-right:15px')
			.title.b.fundCompareIcon2 热门股票型基金对比
			ul
				li(ng-repeat='item in hot5FundList', ng-last-class='lastItem')
					.addToCompare(ng-click='add(item)')
						.selectBox
						| 加入对比
					a.name.b(gf-href='#/fund/detail?pid={{item.id}}', ng-bind='item.title', ng-class='{number1 : $index == 0, number2 : $index == 1, number3 : $index == 2, number4 : $index == 3, number5 : $index == 4}')
					p.category 类型：
						span(ng-bind='item.extra2.jjlx')

	.top5Fund.fundRecommendItems(style='width:32%', ng-show='top5FundList && top5FundList.length')
		.content
			.title.b.fundCompareIcon3 年排名前五股票型基金对比
			ul
				li(ng-repeat='item in top5FundList', ng-last-class='lastItem')
					.addToCompare(ng-click='add(item)')
						.selectBox
						| 加入对比
					a.name.b(gf-href='#/fund/detail?pid={{item.id}}', ng-bind='item.title', ng-class='{number1 : $index == 0, number2 : $index == 1, number3 : $index == 2, number4 : $index == 3, number5 : $index == 4}')
					p.category 类型：
						span(ng-bind='item.extra2.jjlx')
